import type { RouteRecordRaw } from 'vue-router';
import RouterView from '@/layout/routerView/index.vue';

const moduleName = 'routine';

const routes: Array<RouteRecordRaw> = [
  {
    path: '/routine',
    redirect: { name: `/${moduleName}/${moduleName}/routineFirePatrol` },
    component: RouterView,
    meta: {
      title: '日常消防巡查',
      icon: 'icon-zhuomian',
      hideInMenu: true,
    },
    children: [
      {
        path: 'saveRoutine',
        name: `${moduleName}-saveRoutine`,
        meta: {
          title: '创建任务',
          hideInMenu: true,
        },
        component: () => import('@/views/routine/saveRoutine/index.vue'),
      },
      {
        path: 'routineView',
        name: `${moduleName}-routineView`,
        meta: {
          title: '查看任务',
          hideInMenu: true,
        },
        component: () => import('@/views/routine/routineView/index.vue'),
      },
      {
        path: 'handleTasks',
        name: `${moduleName}-handleTasks`,
        meta: {
          title: '处理任务',
          hideInMenu: true,
        },
        component: () => import('@/views/routine/handleTasks/index.vue'),
      },
    ],
  },
];

export default routes;
